package com.lingz.manager.modules.wuxue.controller;

import com.lingz.manager.base.DevplatBaseController;
import com.lingz.manager.common.utils.ResultUtil;
import com.lingz.manager.common.vo.Result;
import com.lingz.manager.modules.wuxue.entity.IndSerCentre;
import com.lingz.manager.modules.wuxue.service.IndSerCentreService;
import com.lingz.manager.modules.wuxue.service.TownGovInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@Slf4j
@RestController
@Api(description = "武穴工业中心接口")
@RequestMapping("/wuxue/industrycentre")
@Transactional
public class IndSerCentreController extends DevplatBaseController<IndSerCentre,String> {
    @Autowired
    IndSerCentreService indSerCentreService;
    @Override
    public IndSerCentreService getService(){return indSerCentreService;}
    @GetMapping("/findIndSerCentreById")
    @ApiOperation("根据id获取主体信息")
    public Result<IndSerCentre> findIndSerCentreById(int id){
        return new ResultUtil<IndSerCentre>().setData( indSerCentreService.findIndSerCentreById(id));
    }
    @GetMapping(value = "/findIndSerCentreList")
    @ApiOperation(value = "不分页查询主体信息")
    public Result<List<IndSerCentre>> findIndSerCentreList(IndSerCentre indSerCentre){
        return new ResultUtil<List<IndSerCentre>>().setData(indSerCentreService.findListIndSerCentre(indSerCentre));
    }
}
